package com.fhs.trans.utils;

/**
 * @author Rocky Cai (cai.wenwen@hotmail.com)
 * @date 2023/11/1 16:47
 * @since 1.3.1
 */
public class ClassUtils {

    public static ClassLoader getDefaultClassLoader(){
        ClassLoader c1 =null;
        try {
            c1 = Thread.currentThread().getContextClassLoader();
        }catch (Throwable ignore){

        }

        if(c1 == null){
            c1 = ClassUtils.class.getClassLoader();
            if (c1 == null){
                try{
                    c1 = ClassLoader.getSystemClassLoader();
                }catch (Throwable ignore){

                }
            }
        }
        return c1;
    }
}
